import { ApiProperty } from '@nestjs/swagger'
import { IsNumber, IsOptional, IsString, IsUrl, Min } from 'class-validator'

export class CreateMovieDto {
  @ApiProperty({ description: '视频名称' })
  @IsString()
  videoName: string

  @ApiProperty({ description: '视频链接' })
  @IsUrl()
  videoUrl: string

  @ApiProperty({ description: '视频封面' })
  @IsUrl()
  videoCover: string

  @ApiProperty({ description: '视频季数', required: false })
  @IsNumber()
  @IsOptional()
  videoSeason?: number

  @ApiProperty({ description: '视频集数', required: false })
  @IsNumber()
  @IsOptional()
  videoNo?: number

  @ApiProperty({ description: '学级，0 幼儿园，1-6 小学，7-8 初中' })
  @IsNumber()
  @Min(0)
  videoGrade: number

  // @ApiProperty({ description: '字幕文件链接', required: false })
  // @IsUrl()
  // @IsOptional()
  // videoSrtUrl?: string

  // @ApiProperty({ description: '字幕类型，1 人工字幕 2 AI字幕', required: false })
  // @IsNumber()
  // @IsOptional()
  // videoSrtType?: number

  @ApiProperty({ description: '视频标签ID' })
  @IsNumber()
  videoTagId: number
}
